﻿@model QLGT_2.Models.tbl_DaoTao

@{
    ViewBag.Title = "Tìm kiếm Đào tạo";
    AjaxOptions aj = new AjaxOptions
    {
        InsertionMode = InsertionMode.Replace,
        UpdateTargetId = "ketquaDaoTao",
        LoadingElementId = "loading-icon",
        OnFailure = "AjaxFailure",
        OnBegin = "AjaxBegin",
        OnComplete = "AjaxComplete"
    };
}

@using (Ajax.BeginForm(aj))
{
    @Html.AntiForgeryToken()
    <header class="panel-heading">
        <h3 style="text-align: center; font-weight: bold">Tìm kiếm Đào tạo</h3>
    </header>
    <div class="panel-body">
        <div class="form-horizontal">
            <div class="row">
                <div class="col-lg-6">
                    <strong class="col-xs-4">
                        Tên Ngành:
                    </strong>
                    <strong class="col-xs-8">
                        @Html.TextBox("txtTenNganh", "", new { @class = "form-control", data_val = "false" })
                    </strong>
                </div>
                <div class="col-lg-6">
                    <strong class="col-xs-4"> 
                        Năm học:
                    </strong>
                    <strong class="col-xs-8">
                        @Html.DropDownList("listNam", new List<SelectListItem>
                        {
                            new SelectListItem { Text = null, Value = null, Selected=true},
                            new SelectListItem { Text = "1", Value = "1"},
                            new SelectListItem { Text = "2", Value = "2"},
                            new SelectListItem { Text = "3", Value = "3"},
                            new SelectListItem { Text = "4", Value = "4"},
                            new SelectListItem { Text = "5", Value = "5"}
                        }, new { @class = "form-control", data_val = "false" }) 
                    </strong>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-6">
                    <strong class="col-xs-4">
                        Tên Môn học:
                    </strong>
                    <strong class="col-xs-8">
                        @Html.TextBox("txtTenMonHoc", "", new { @class = "form-control", data_val = "false" })
                    </strong>
                </div>
                <div class="col-lg-6">
                    <strong class="col-xs-4">
                        Kỳ học:
                    </strong>
                    <strong class="col-xs-8">
                        @Html.DropDownList("listKy", new List<SelectListItem>
                        {
                            new SelectListItem { Text = null, Value = null, Selected=true},
                            new SelectListItem { Text = "1", Value = "1"},
                            new SelectListItem { Text = "2", Value = "2"}
                        }, new { @class = "form-control", data_val = "false" }) 
                    </strong>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-6">
                    <strong class="col-xs-4">
                        Tên Giáo trình:
                    </strong>
                    <strong class="col-xs-8">
                        @Html.TextBox("txtTenGiaoTrinh", "", new { @class = "form-control", data_val = "false" })
                    </strong>
                </div>
                <div class="col-lg-6">
                    <strong class="col-xs-4">
                        Số tín chỉ:
                    </strong>
                    <strong class="col-xs-8">
                        @Html.DropDownList("listTinChi", new List<SelectListItem>
                        {
                            new SelectListItem { Text = null, Value = null, Selected=true},
                            new SelectListItem { Text = "1", Value = "1"},
                            new SelectListItem { Text = "2", Value = "2"},
                            new SelectListItem { Text = "3", Value = "3"},
                            new SelectListItem { Text = "4", Value = "4"},
                            new SelectListItem { Text = "5", Value = "5"},
                            new SelectListItem { Text = "6", Value = "6"},
                            new SelectListItem { Text = "7", Value = "7"},
                            new SelectListItem { Text = "8", Value = "8"},
                            new SelectListItem { Text = "9", Value = "9"},
                            new SelectListItem { Text = "10", Value = "10"},
                            new SelectListItem { Text = "11", Value = "11"},
                            new SelectListItem { Text = "12", Value = "12"},
                            new SelectListItem { Text = "13", Value = "13"},
                            new SelectListItem { Text = "14", Value = "14"},
                            new SelectListItem { Text = "15", Value = "15"},
                            new SelectListItem { Text = "16", Value = "16"},
                            new SelectListItem { Text = "17", Value = "17"},
                            new SelectListItem { Text = "18", Value = "18"},
                            new SelectListItem { Text = "19", Value = "19"},
                            new SelectListItem { Text = "20", Value = "20"}
                        }, new { @class = "form-control", data_val = "false" }) 
                    </strong>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-6">
                    <strong class="col-xs-4">
                        Tên Khoa giảng dạy:
                    </strong>
                    <strong class="col-xs-8">
                        @Html.TextBox("txtTenKhoa", "", new { @class = "form-control", data_val = "false" })
                    </strong>
                </div>
                <div class="col-lg-6">
                    <strong class="col-xs-4"></strong>
                    <strong class="col-xs-8"></strong>
                </div>
            </div>
            <br />
            <div class="row">
                <div style="text-align:center">
                    <input type="submit" value="Tìm kiếm" class="btn btn-danger" id="btTimKiem" />
                    <input type="button" value="Xóa" class="btn btn-danger" id="btXoa" />
                </div>
            </div>
            <br />
        </div>
    </div>
}
@*<div id="grid"></div>*@
<div id="ketquaDaoTao"></div>


@*can sua*@
<script>
    $('#btXoa').click(function () {
        $('#txtTenNganh').val("");
        $('#txtTenMonHoc').val("");
        $('#txtTenKhoa').val("");
        $('#txtTenGiaoTrinh').val("");
        $('#txtNamHoc').val("");
        $('#txtKyHoc').val("");
        $('#txtSoTinChi').val("");
    });
</script>